const dialog = Vue.extend({
    template:`
    <div>
    <el-dialog
        :title="title"
        :visible="visible"
        :width="width"
        @update:visible="
            (e) => {
            cancel(e);
            }
        "
    >
        <slot> 默认内容 </slot>
        <div slot="footer" class="dialog-footer">
            <el-button @click="cancel(false)">取 消</el-button>
            <el-button type="primary" @click="confirm(false)">确 定</el-button>
        </div>
        </el-dialog>
    </div>
    `,
  name: "confirm",
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    width: {
      type: String,
      default: "50%",
    },
    title: {
      type: String,
      require: false,
      default: "收货地址",
    },
    cancel: {
      type: Function,
      default: function (val) {
        this.$emit("change", val);
      },
    },
    confirm: {
      type: Function,
      default: function (val) {
        this.$emit("change", val);
      },
    },
  },
  data() {
    return {
      dialogFormVisible: false,
      form: {
        label: "",
        id: "",
      },
      formLabelWidth: "120px",
    };
  },
  model: {
    prop: "visible",
    event: "change",
  },
  methods: {}
})